.TH jpegapp 1 "October 2010" "version 0.1" "USER COMMANDS"
.SH NAME
jpegapp \- manipulate the APPn application data segments of JPEG files
.SH SYNOPSIS
.B jpegapp
[\-hv] [\-x n=template] [\-i argument ] [\-r n] [\-o filename] [inputfile]
.SH DESCRIPTION
JPEG files can contain any number of application specific
segments. These are named APP0 through APP15. jpegapp can be used to
remove, insert, or extract these application specific segments.
.PP
Possible reasons might be to embed some extra metadata in the JPEG
file, to remove some application data which is no longer needed, or to
tear a file apart to analyze an application's data segments.
.SH OPTIONS
.TP
\-h
display a short help text
.TP
\-v
be verbose, only useful for debugging
.TP
\-i, \-\-insert seg=string
Insert an APPn segment where n=seg with the contents of 'string'.
.TP
\-i, \-\-insert seg@filename
Insert an APPn segment where n=seg with the contents of the file 'filename'.
.TP
\-r, \-\-remove seg
Remove all APPn segments where n=seg from the JPEG image.
.TP
\-x, \-\-extract template
Extract all of the APPn segments (where n=seg) from the JPEG input
image. Each of these will be stored in a file named after the template
with all "@" characters replaced with a sequence number, starting at zero.
.TP
\-o, \-\-output filename
Send the output image to the named file instead of standard output.
.SH ARGUMENTS
.TP
inputfile
If a file is named it is used instead of standard input.
.SH EXAMPLES
.PP
One might add a PNG mask image to a JPEG using APP7 by
convention. This takes two APP7 segments each beginning with the text
"alpha0". One we show as a literal, the other as an included file.
.IP
.B jpegapp
\-i 7=alpha0content-type:image/png
\-i 7=data@mask.embed
\-o somefile-embed.jpg
somefile.jpg
.PP
One could remove the EXIF data from a JPEG like this.
.IP
.B jpegapp
\-r 0
\-o barefile.jpg
biggerfile.jpg
.PP
.SH AUTHOR
Jim Studt, jim@studt.net

